//
// Created by 11793 on 2025/11/1.
//
#include <stdio.h>
//获取数组最大值
int max_arr(int *arr,int size){
    int *q = arr;
    int max = *arr;
    for ( ; q < arr + size; q++) {
        max < *q ? max = *q:0;
    }
    return max;
}
int main(){
    int num[4] = {1,43,454,23};
    int size = sizeof num / sizeof num[0];
    int j;
    j = max_arr(num,size);
    printf("max: %d",j);
}